﻿@namespace CyssBlazor.Shared.Components
@inherits InputFileBase
<style>
    .input-footer {
        position: absolute;
        bottom: 0;
    }
</style>
@if (ShowLabel)
{
    <label class="form-label" for="@Id">@DisplayText</label>
}
<div class="form-group-input" style="width:100%">
    <div class="input-group">
        <div>
            <img src="@ImageUrl" style="height:100px;width:100px" />
        </div>
        <div>
            <div class="input-group-append input-footer">
                @if (IsDisabled)
                {
                    <button type="button" @onclick="Select" class="@ClassName" role="button" disabled="disabled">
                        <i class="fa fa-folder-open-o"></i><span><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">浏览</font></font></span>
                    </button>
                }
                else
                {
                    <button type="button" @onclick="Select" class="@ClassName" role="button">
                        <i class="fa fa-folder-open-o"></i><span><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">浏览</font></font></span>
                    </button>
                }
            </div>
            <div style="display:none">
                <InputFile id="@Id" @ref="inputFile" accept="@AllowFileType" OnChange="OnInputFileChange" />
            </div>
        </div>

    </div>
</div>
